package com.yqg.education.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * question 实体类
 *
 * @author 张芸博
 * @since 2025-04-08
 */
@Getter
@Setter
public class Question implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 课程ID
     */
    @ExcelProperty(value = "课程ID", index = 0)
    private Long courseId;

    /**
     * 类型：1单选题；2多选题；3判断题；4填空题
     */
    @ExcelProperty(value = "类型：1单选题；2多选题；3判断题；4填空题", index = 2)
    private String questionType;

    /**
     * 题目内容
     */
    @ExcelProperty(value = "题目内容", index = 1)
    private String questionText;

    /**
     * 选项
     */
    @ExcelProperty(value = "选项", index = 3)
    private String chooseOption;

    /**
     * 答案
     */
    @ExcelProperty(value = "答案", index = 4)
    private String answer;

    /**
     * 答案解析
     */
    @ExcelProperty(value = "答案解析", index = 5)
    private String answerAnaly;

    /**
     * 创建时间
     */
    @ExcelIgnore
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    /**
     * 是否删除
     */
    @ExcelIgnore
    private Integer isDelete;

    @ExcelIgnore
    @TableField(exist = false)
    private String stuAnswer;

    /**
     * 题目分数
     */
    @ExcelIgnore
    @TableField(exist = false)
    private BigDecimal score;
    /**
     * 学员答案
     */
    @ExcelIgnore
    @TableField(exist = false)
    private String courseName;
    /**
     * 是否正确：0正确；1错误；
     */
    @ExcelIgnore
    @TableField(exist = false)
    private Integer isTrue;
}
